package fms.core.uplinkmsg;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

/**
 * Created with IntelliJ IDEA.
 * User: adcc
 * Date: 14-6-10
 * Time: 下午1:52
 * To change this template use File | Settings | File Templates.
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class UplinkMsgHead {

    @XmlAttribute(name="appUpMsgId")
    private String appUpMsgId;
    @XmlAttribute(name="appUpMsgType")
    private String appUpMsgType;
    @XmlAttribute(name="priovity")
    private String priovity;
    @XmlAttribute(name="an")
    private String an;
    @XmlAttribute(name="fi")
    private String fi;
    @XmlAttribute(name="tko")
    private String originAirport;
    @XmlAttribute(name="des")
    private String destAirport;
    @XmlAttribute(name="smi")
    private String smi;
    @XmlAttribute(name="autoReply")
    private boolean autoreply = false;
    @XmlAttribute(name="appName")
    private String apptype;
    @XmlAttribute(name="airline")
    private String airline;
    @XmlAttribute(name="onlyLastReply")
    private boolean onlyLastReply;
    @XmlElement(name="tag")
    private String tag;


    public UplinkMsgHead(){
        this.appUpMsgId = "";
        this.appUpMsgType = "";
        this.priovity = "QU";
        this.an = "";
        this.fi = "";
        this.originAirport = "";
        this.destAirport = "";
        this.smi = "";
        this.autoreply = true;
        this.apptype = "";
        this.airline = "";
        this.onlyLastReply = false;
        this.tag = "";
    }

    public UplinkMsgHead(
                        String datagramid,
                        String datagramtype,
                        String priovity,
                        String an,
                         String fi,
                         String tko,
                         String des,
                         String smi,
                         boolean autoreply,
                         String apptype,
                         String airlinesNo,
                         boolean onlyLastReply,
                         String tag){

        this.appUpMsgId = datagramid;
        this.appUpMsgType = datagramtype;
        this.priovity = priovity;
        this.an = an;
        this.fi = fi;
        this.originAirport = tko;
        this.destAirport = des;
        this.smi = smi;
        this.autoreply = autoreply;
        this.apptype = apptype;
        this.airline = airlinesNo;
        this.onlyLastReply = onlyLastReply;
        this.tag = tag;

    }

    public String getAppUpMsgId() {
        return appUpMsgId;
    }

    public void setAppUpMsgId(String appUpMsgId) {
        this.appUpMsgId = appUpMsgId;
    }

    public String getAppUpMsgType() {
        return appUpMsgType;
    }

    public void setAppUpMsgType(String appUpMsgType) {
        this.appUpMsgType = appUpMsgType;
    }

    public String getPriovity() {
        return priovity;
    }

    public void setPriovity(String priovity) {
        this.priovity = priovity;
    }

    public String getAn() {
        return an;
    }

    public void setAn(String an) {
        this.an = an;
    }

    public String getFi() {
        return fi;
    }

    public void setFi(String fi) {
        this.fi = fi;
    }

    public String getOriginAirport() {
        return originAirport;
    }

    public void setOriginAirport(String originAirport) {
        this.originAirport = originAirport;
    }

    public String getDestAirport() {
        return destAirport;
    }

    public void setDestAirport(String destAirport) {
        this.destAirport = destAirport;
    }

    public String getSmi() {
        return smi;
    }

    public void setSmi(String smi) {
        this.smi = smi;
    }

    public boolean isAutoreply() {
        return autoreply;
    }

    public void setAutoreply(boolean autoreply) {
        this.autoreply = autoreply;
    }

    public String getApptype() {
        return apptype;
    }

    public void setApptype(String apptype) {
        this.apptype = apptype;
    }

    public String getAirline() {
        return airline;
    }

    public void setAirline(String airline) {
        this.airline = airline;
    }

    public boolean isOnlyLastReply() {
        return onlyLastReply;
    }

    public void setOnlyLastReply(boolean onlyLastReply) {
        this.onlyLastReply = onlyLastReply;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }
}
